/*
 * File:   PacketFormat.h
 * Author: denis
 *
 * Created on February 14, 2012, 2:15 PM
 */
#include <string>
#include <iostream>
#include <stdlib.h>

#ifndef PACKETFORMAT_H
#define	PACKETFORMAT_H

using namespace std;

class PacketFormat {
public:
    PacketFormat();
    PacketFormat(char c, char i, int l, string d);
    PacketFormat (string strPack);
    PacketFormat(const PacketFormat& orig);
    virtual ~PacketFormat();
    std::string compilePacket();
    void setCode(int c);
    void setId (int i);
    void setLength(int l);
    void setData(string d);
    char getCode();
    char getId();
    int getLength();
    string getData();
    void print();
    //void tokenizeString(string inputStr, string outputStr[], int& size);

protected:
    char code;
    char identifier;
    int length;
    std::string data;
};

#endif	/* PACKETFORMAT_H */

